Trichoderma Antagonism Assays

Aaron Onufrak

2023-03-22

Loading Packages

library(drc)
library(tidyr)
library(ggplot2)
library(ggpubr)
library(car)
library(data.table)

Custom Functions

Function 01: Percent Inhibition tabulator

This function is used to calculate percent inhibition from a data frame that contains the colony area information for multiple isolates across multiple treatments. The function takes the following arguments:

  1. df: The data frame (in wide format) that contains the isolate names and the treatments.
  2. isolate_names: This is the list of trichoderma isolates used in the juglone assays. If these are present then the function will tabulate percent inhibition for the juglone assays.
  3. concentration_list: This is the list of metabolite percentages. If these are present then the function will tabulate percent inhibition for the poison agar assays.
percent_inhibition_tabulator<-function(df,isolate_names=NULL,concentration_list=NULL){
  if(is.null(concentration_list)==TRUE){
  percent_inhibition_frames<-data.frame()
for(i in 1:length(isolate_names)){
  regexp<-paste0("\\b",isolate_names[[i]],"\\b") # This will make it so that grep only selects the exact isolate name
  individ_isolate_data<-df[grep(regexp,df$Isolate),] # Subsetting so that only a single isolate is being considered
  isolate_zero_avg<-mean(individ_isolate_data$`0`,na.rm = TRUE) # Calculating the mean colony area for the selected isolate
  percent_inhibition_isolate<-100*((isolate_zero_avg-Filter(x=individ_isolate_data,f=is.numeric))/isolate_zero_avg) # Calculating percent inhibition
  percent_inhibition_isolate_frame<-data.frame(isolate=isolate_names[[i]],replicate=individ_isolate_data["Replicate"], percent_inhibition_isolate) # Creating new data frame
  colnames(percent_inhibition_isolate_frame)<-sub("X","",colnames(percent_inhibition_isolate_frame)) # Removing X's that show up in new column names
  percent_inhibition_isolate_frame_long<-gather(percent_inhibition_isolate_frame,Concentration,percent_inhibition,3:7)
  percent_inhibition_frames<-rbind(percent_inhibition_frames,percent_inhibition_isolate_frame_long)
}
  return(percent_inhibition_frames)
  # this will shunt into the version for the trichoderma poison agar analyses
} else {
  poison_inhibition_frames<-data.frame()
for(i in 1:length(poison_concentrations)){
  poison_inhibition_by_gm_iso<-df[grep(concentration_list[[i]], df$Percentage),] # This will grep the metabolite percentage 
  isolate_zero_avg<-mean(poison_inhibition_by_gm_iso$PDA,na.rm = TRUE) # This will select the PDA treatment control for mean calculation
  percent_inhibition_isolate<-((isolate_zero_avg-Filter(x=poison_inhibition_by_gm_iso,is.numeric))/isolate_zero_avg)*100 # Calculates the percent inhibition selection only numeric columns in the data frame. 
  percent_inhibition_isolate_df<-data.frame(replicate=poison_inhibition_by_gm_iso$Replicate,Percentage=poison_inhibition_by_gm_iso$Percentage,Isolate=poison_inhibition_by_gm_iso$Isolate,percent_inhibition_isolate)
  percent_inhibition_isolate_frame_long<-gather(percent_inhibition_isolate_df,treatment,percent_inhibition,4:length(percent_inhibition_isolate_df))
  poison_inhibition_frames<-rbind(poison_inhibition_frames,percent_inhibition_isolate_frame_long)
}
  return(poison_inhibition_frames)
}
}

Outline

The following code details the analyses performed for the following laboratory assays:

  1. Beauveria bassiana and Trichoderma spp. juglone assays.
  2. Trichoderma spp. and Geosmithia morbida dual-plate antagonism assays.
  3. Trichoderma spp. metabolite assays against Geosmithia morbida

Part 01: Juglone assays

Data Import

Importing data into R. The following two data frames are used for the analyses:

  1. b_bassiana_juglone_responses.txt: contain the colony areas of B. bassiana strain GHA to juglone 3 days after inoculation.
  2. trichoderma_juglone_responses.txt: contain the colony areas of the 15 Trichoderma isolates to juglone.

All colony areas used in the study were measured using ImageJ.

# Importing Beauveria colony area
beauveria.juglone<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/b_bassiana_juglone_responses.txt",sep='\t',header=TRUE)

# Importing Trichoderma colony area data
trichoderma.juglone<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/trichoderma_juglone_responses.txt",sep='\t',header=TRUE)

Part 01.1: Beauveria juglone data analyses

Below I do all of the statistical analyses for B. bassiana strain GHA to juglone. The procedure goes as follows:

  1. Calculate the mean area of colonies grown on the now juglone control.
  2. Use the mean to calculate percent growth inhibition for the colonies on all of the juglone concentrations. We also include in our analyses the the negative control plates to account for the amount of variation in growth at the negative control.
  3. Conduct a two-way ANOVA to detect significant differences in percent growth inhibition by juglone concentrations.
# Changing concentration to a factor
beauveria.juglone$Concentration<-as.factor(beauveria.juglone$Concentration)

# Omitting NAs from beauveria data
beauveria.juglone_no_na<-na.omit(beauveria.juglone)

# Converting table to wide format
beauveria.juglone_no_na_wide<-spread(beauveria.juglone_no_na,Concentration,area)

# Converting replicate to a factor so that it is not treated numerically.  
beauveria.juglone_no_na_wide$Replicate<-as.character(beauveria.juglone_no_na_wide$Replicate)

# Calculating average of acetone control. Setting na.rm to true to remove NA entries. 
beauveria.juglone_no_na_control_average<-mean(beauveria.juglone_no_na_wide$`0`,na.rm = TRUE)

# Calculating percent inhibition of colony growth
beauveria.juglone_no_na_control_average_percent_inhibition<-100*((beauveria.juglone_no_na_control_average-Filter(x=beauveria.juglone_no_na_wide,f=is.numeric))/beauveria.juglone_no_na_control_average)

# Converting table from wide format to long
beauveria.juglone_no_na_control_average_percent_inhibition_long<-gather(beauveria.juglone_no_na_control_average_percent_inhibition,Concentration,percent_inhibition,1:5)

# Sanity check to make sure number of rows is correct after omitting NAs
nrow(na.omit(beauveria.juglone_no_na_control_average_percent_inhibition_long))
## [1] 45
# Removing NA values from the table
beauveria.juglone_no_na_control_average_percent_inhibition_long<-na.omit(beauveria.juglone_no_na_control_average_percent_inhibition_long)

# Converting concentration to a factor
beauveria.juglone_no_na_control_average_percent_inhibition_long$Concentration<-as.factor(beauveria.juglone_no_na_control_average_percent_inhibition_long$Concentration)

# Conducting ANOVA on Beauveria data 
beauveria.juglone_percent_inhibition_aov<-aov(percent_inhibition~Concentration,beauveria.juglone_no_na_control_average_percent_inhibition_long,)

# Assessing model assumpions
par(mfrow=c(2,2))
plot(beauveria.juglone_percent_inhibition_aov)

# Doing a type III ANOVA to account for differences in sample sizes as a result of plug dislodging. 
Anova(beauveria.juglone_percent_inhibition_aov,type="III")
## Anova Table (Type III tests)
## 
## Response: percent_inhibition
##                Sum Sq Df F value    Pr(>F)    
## (Intercept)       0.0  1   0.000         1    
## Concentration 24934.4  4  59.704 2.473e-16 ***
## Residuals      4176.3 40                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Using tukeys post-hoc test to detect significant pair-wise differences
beauveria.juglone_tukey_results<-TukeyHSD(beauveria.juglone_percent_inhibition_aov)
beauveria.juglone_tukey_results 
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = percent_inhibition ~ Concentration, data = beauveria.juglone_no_na_control_average_percent_inhibition_long)
## 
## $Concentration
##               diff        lwr      upr     p adj
## 0.3-0   57.7805260  41.796024 73.76503 0.0000000
## 0.6-0   71.5449675  55.560465 87.52947 0.0000000
## 0.9-0   77.1655475  61.181045 93.15005 0.0000000
## 1.2-0   77.4242493  61.439747 93.40875 0.0000000
## 0.6-0.3 13.7644415   0.713150 26.81573 0.0342980
## 0.9-0.3 19.3850215   6.333730 32.43631 0.0011449
## 1.2-0.3 19.6437234   6.592432 32.69501 0.0009660
## 0.9-0.6  5.6205800  -7.430711 18.67187 0.7341503
## 1.2-0.6  5.8792819  -7.172010 18.93057 0.7007741
## 1.2-0.9  0.2587019 -12.792590 13.30999 0.9999976
# Plotting results in ggplot
beauveria_plot<-ggplot(data=beauveria.juglone_no_na_control_average_percent_inhibition_long,aes(x=Concentration,y=percent_inhibition,fill=Concentration))+
geom_boxplot(outlier.shape=NA)+
  geom_jitter()+
  geom_hline(yintercept = c(0,50),linetype=2)+
  theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
  scale_y_continuous(limits=c(-100,100),breaks=c(-100,-75,-50,-25,0,25,50,75,100))+
  geom_text(data=NULL,aes(x=1,y=100,label="A"),inherit.aes = FALSE)+
  geom_text(data=NULL,aes(x=2,y=100,label="B"),inherit.aes = FALSE)+
  geom_text(data=NULL,aes(x=3,y=100,label="C"),inherit.aes = FALSE)+
  geom_text(data=NULL,aes(x=4,y=100,label="C"),inherit.aes = FALSE)+
  geom_text(data=NULL,aes(x=5,y=100,label="C"),inherit.aes = FALSE)+
  ylab("Percent Inhibition (%)")+
  xlab("Concentration (mg/mL)")

beauveria_plot
## Warning in geom_text(data = NULL, aes(x = 1, y = 100, label = "A"), inherit.aes = FALSE): All aesthetics have length 1, but the data has 45 rows.
## ℹ Did you mean to use `annotate()`?
## Warning in geom_text(data = NULL, aes(x = 2, y = 100, label = "B"), inherit.aes = FALSE): All aesthetics have length 1, but the data has 45 rows.
## ℹ Did you mean to use `annotate()`?
## Warning in geom_text(data = NULL, aes(x = 3, y = 100, label = "C"), inherit.aes = FALSE): All aesthetics have length 1, but the data has 45 rows.
## ℹ Did you mean to use `annotate()`?
## Warning in geom_text(data = NULL, aes(x = 4, y = 100, label = "C"), inherit.aes = FALSE): All aesthetics have length 1, but the data has 45 rows.
## ℹ Did you mean to use `annotate()`?
## Warning in geom_text(data = NULL, aes(x = 5, y = 100, label = "C"), inherit.aes = FALSE): All aesthetics have length 1, but the data has 45 rows.
## ℹ Did you mean to use `annotate()`?

Part 01.2: Trichoderma juglone data analyses

Below I do all of the statistical analyses for 15 Trichodmera isolates to juglone. The procedure goes as follows:

  1. Calculate the mean area of colonies grown on the now juglone control.
  2. Use the mean to calculate percent growth inhibition for the colonies on all of the juglone concentrations. We also include in our analyses the the negative control plates to account for the amount of variation in growth at the negative control.
  3. Conduct a two-way ANOVA to detect significant differences in percent growth inhibition by juglone concentrations.
# Determining the number of plugs that fell off of each isolate
nrow(trichoderma.juglone[grep("^[^N].*Gm",trichoderma.juglone$Isolate,invert=TRUE),])
## [1] 750
nrow(na.omit(trichoderma.juglone[grep("^[^N].*Gm",trichoderma.juglone$Isolate, invert=TRUE),]))
## [1] 739
# Removing NAs
trichoderma.juglone_no.na<-na.omit(trichoderma.juglone)

# Converting the table to wide format
trichoderma.juglone_no.na_wide<-spread(trichoderma.juglone_no.na,Concentration,Area)

trichoderma.juglone_no.na_wide$Replicate<-as.character(trichoderma.juglone_no.na_wide$Replicate)

# Parsing out Trichoderma isolate names
trichoderma.isolate.names<-unique(trichoderma.juglone_no.na_wide$Isolate)

# Calculating percent inhibition on a isolate basis
trichoderma.juglone_inhibition_frames<-percent_inhibition_tabulator(isolate_names=trichoderma.isolate.names,df=trichoderma.juglone_no.na_wide)

# Omitting NAs
trichoderma.juglone_inhibition_frames<-na.omit(trichoderma.juglone_inhibition_frames)

# Converting concentration to a factor
trichoderma.juglone_inhibition_frames$Concentration<-as.factor(trichoderma.juglone_inhibition_frames$Concentration)

# Conducting ANOVA
trichoderma.juglone_percent_inhibition_aov<-aov(percent_inhibition~isolate*Concentration,trichoderma.juglone_inhibition_frames)

# Assessing model assumptions
par(mfrow=c(2,2))
plot(trichoderma.juglone_percent_inhibition_aov)

# Determining p-values 
Anova(trichoderma.juglone_percent_inhibition_aov,type="III")
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted
## Anova Table (Type III tests)
## 
## Response: percent_inhibition
##                       Sum Sq  Df F value Pr(>F)    
## (Intercept)                0   1   0.000      1    
## isolate                    0  14   0.000      1    
## Concentration          33763   4  64.043 <2e-16 ***
## isolate:Concentration 174119  56  23.591 <2e-16 ***
## Residuals              87514 664                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tricho.tukey_results<-TukeyHSD(trichoderma.juglone_percent_inhibition_aov)

# Pulling out post-hoc results per isolate

# NGM36-1
ngm36_1<-tricho.tukey_results$`isolate:Concentration`[grep("NGM36-1.*-NGM36-1.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
ngm36_1
##                               diff        lwr        upr     p adj
## NGM36-1:0.3-NGM36-1:0    77.828787  54.962836 100.694737 0.0000000
## NGM36-1:0.6-NGM36-1:0    62.929422  40.063472  85.795373 0.0000000
## NGM36-1:0.9-NGM36-1:0    61.729045  38.863095  84.594996 0.0000000
## NGM36-1:1.2-NGM36-1:0    73.953174  51.087223  96.819124 0.0000000
## NGM36-1:0.6-NGM36-1:0.3 -14.899365 -36.457589   6.658860 0.8743877
## NGM36-1:0.9-NGM36-1:0.3 -16.099741 -37.657966   5.458483 0.7074648
## NGM36-1:1.2-NGM36-1:0.3  -3.875613 -25.433838  17.682612 1.0000000
## NGM36-1:0.9-NGM36-1:0.6  -1.200377 -22.758602  20.357848 1.0000000
## NGM36-1:1.2-NGM36-1:0.6  11.023751 -10.534473  32.581976 0.9997910
## NGM36-1:1.2-NGM36-1:0.9  12.224128  -9.334097  33.782353 0.9966271
# Rootshield (AKA KRL-AG2)
rootshield<-tricho.tukey_results$`isolate:Concentration`[grep("RootShield:.*-RootShield:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
rootshield
##                                     diff        lwr       upr      p adj
## RootShield:0.3-RootShield:0   17.4574053  -4.100820  39.01563 0.47078572
## RootShield:0.6-RootShield:0   66.2053640  44.647139  87.76359 0.00000000
## RootShield:0.9-RootShield:0   88.1406999  66.582475 109.69892 0.00000000
## RootShield:1.2-RootShield:0   89.0006999  67.442475 110.55892 0.00000000
## RootShield:0.6-RootShield:0.3 48.7479587  27.189734  70.30618 0.00000000
## RootShield:0.9-RootShield:0.3 70.6832946  49.125070  92.24152 0.00000000
## RootShield:1.2-RootShield:0.3 71.5432946  49.985070  93.10152 0.00000000
## RootShield:0.9-RootShield:0.6 21.9353359   0.377111  43.49356 0.03818769
## RootShield:1.2-RootShield:0.6 22.7953358   1.237111  44.35356 0.01998958
## RootShield:1.2-RootShield:0.9  0.8599999 -20.698225  22.41822 1.00000000
# TN-26
tn1_26<-tricho.tukey_results$`isolate:Concentration`[grep("TN1-26.*-TN1-26.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn1_26
##                            diff        lwr       upr      p adj
## TN1-26:0.3-TN1-26:0   24.282330   2.133360  46.43130 0.01020136
## TN1-26:0.6-TN1-26:0   62.652673  40.503703  84.80164 0.00000000
## TN1-26:0.9-TN1-26:0   76.473848  53.050110  99.89759 0.00000000
## TN1-26:1.2-TN1-26:0   79.845205  57.696234 101.99418 0.00000000
## TN1-26:0.6-TN1-26:0.3 38.370343  16.812118  59.92857 0.00000000
## TN1-26:0.9-TN1-26:0.3 52.191518  29.325567  75.05747 0.00000000
## TN1-26:1.2-TN1-26:0.3 55.562874  34.004650  77.12110 0.00000000
## TN1-26:0.9-TN1-26:0.6 13.821175  -9.044776  36.68713 0.98618313
## TN1-26:1.2-TN1-26:0.6 17.192531  -4.365694  38.75076 0.51710920
## TN1-26:1.2-TN1-26:0.9  3.371357 -19.494594  26.23731 1.00000000
# TN1-2
tn1_2<-tricho.tukey_results$`isolate:Concentration`[grep("TN1-2:.*-TN1-2:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn1_2
##                           diff        lwr      upr     p adj
## TN1-2:0.3-TN1-2:0   61.7564856  40.198261 83.31471 0.0000000
## TN1-2:0.6-TN1-2:0   62.6029260  41.044701 84.16115 0.0000000
## TN1-2:0.9-TN1-2:0   68.0691326  46.510908 89.62736 0.0000000
## TN1-2:1.2-TN1-2:0   75.7433483  54.185123 97.30157 0.0000000
## TN1-2:0.6-TN1-2:0.3  0.8464404 -20.711784 22.40467 1.0000000
## TN1-2:0.9-TN1-2:0.3  6.3126470 -15.245578 27.87087 1.0000000
## TN1-2:1.2-TN1-2:0.3 13.9868627  -7.571362 35.54509 0.9498199
## TN1-2:0.9-TN1-2:0.6  5.4662066 -16.092018 27.02443 1.0000000
## TN1-2:1.2-TN1-2:0.6 13.1404223  -8.417803 34.69865 0.9836633
## TN1-2:1.2-TN1-2:0.9  7.6742157 -13.884009 29.23244 1.0000000
# TN1-4
tn1_4<-tricho.tukey_results$`isolate:Concentration`[grep("TN1-4:.*-TN1-4:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn1_4
##                          diff       lwr       upr p adj
## TN1-4:0.3-TN1-4:0   46.076812  24.51859  67.63504     0
## TN1-4:0.6-TN1-4:0   87.245729  65.68750 108.80395     0
## TN1-4:0.9-TN1-4:0   92.470826  70.91260 114.02905     0
## TN1-4:1.2-TN1-4:0   88.391220  66.83300 109.94945     0
## TN1-4:0.6-TN1-4:0.3 41.168917  19.61069  62.72714     0
## TN1-4:0.9-TN1-4:0.3 46.394014  24.83579  67.95224     0
## TN1-4:1.2-TN1-4:0.3 42.314408  20.75618  63.87263     0
## TN1-4:0.9-TN1-4:0.6  5.225097 -16.33313  26.78332     1
## TN1-4:1.2-TN1-4:0.6  1.145491 -20.41273  22.70372     1
## TN1-4:1.2-TN1-4:0.9 -4.079606 -25.63783  17.47862     1
# TN1-66
tn1_66<-tricho.tukey_results$`isolate:Concentration`[grep("TN1-66:.*-TN1-66:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn1_66
##                            diff        lwr       upr        p adj
## TN1-66:0.3-TN1-66:0   44.638735  23.080511  66.19696 0.000000e+00
## TN1-66:0.6-TN1-66:0   75.871145  54.312920  97.42937 0.000000e+00
## TN1-66:0.9-TN1-66:0   79.108528  57.550303 100.66675 0.000000e+00
## TN1-66:1.2-TN1-66:0   74.616920  53.058695  96.17514 0.000000e+00
## TN1-66:0.6-TN1-66:0.3 31.232410   9.674185  52.79063 5.356728e-06
## TN1-66:0.9-TN1-66:0.3 34.469793  12.911568  56.02802 1.110560e-07
## TN1-66:1.2-TN1-66:0.3 29.978184   8.419959  51.53641 2.179983e-05
## TN1-66:0.9-TN1-66:0.6  3.237383 -18.320842  24.79561 1.000000e+00
## TN1-66:1.2-TN1-66:0.6 -1.254225 -22.812450  20.30400 1.000000e+00
## TN1-66:1.2-TN1-66:0.9 -4.491609 -26.049834  17.06662 1.000000e+00
#TN2-51
tn2_51<-tricho.tukey_results$`isolate:Concentration`[grep("TN2-51:.*-TN2-51:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn2_51
##                            diff        lwr      upr      p adj
## TN2-51:0.3-TN2-51:0   22.784201   1.225976 44.34243 0.02016343
## TN2-51:0.6-TN2-51:0   65.929843  44.371618 87.48807 0.00000000
## TN2-51:0.9-TN2-51:0   74.171961  52.613736 95.73019 0.00000000
## TN2-51:1.2-TN2-51:0   78.059819  56.501594 99.61804 0.00000000
## TN2-51:0.6-TN2-51:0.3 43.145642  21.587417 64.70387 0.00000000
## TN2-51:0.9-TN2-51:0.3 51.387760  29.829535 72.94598 0.00000000
## TN2-51:1.2-TN2-51:0.3 55.275619  33.717394 76.83384 0.00000000
## TN2-51:0.9-TN2-51:0.6  8.242118 -13.316107 29.80034 1.00000000
## TN2-51:1.2-TN2-51:0.6 12.129977  -9.428248 33.68820 0.99720140
## TN2-51:1.2-TN2-51:0.9  3.887859 -17.670366 25.44608 1.00000000
# TN3-2
tn3_2<-tricho.tukey_results$`isolate:Concentration`[grep("TN3-2:.*-TN3-2:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn3_2
##                          diff         lwr       upr      p adj
## TN3-2:0.3-TN3-2:0   72.245081  50.0961107  94.39405 0.00000000
## TN3-2:0.6-TN3-2:0   92.923641  70.7746704 115.07261 0.00000000
## TN3-2:0.9-TN3-2:0   95.264766  72.5404020 117.98913 0.00000000
## TN3-2:1.2-TN3-2:0   95.056505  72.9075348 117.20548 0.00000000
## TN3-2:0.6-TN3-2:0.3 20.678560  -0.8796651  42.23678 0.09038609
## TN3-2:0.9-TN3-2:0.3 23.019685   0.8707145  45.16866 0.02694880
## TN3-2:1.2-TN3-2:0.3 22.811424   1.2531992  44.36965 0.01974078
## TN3-2:0.9-TN3-2:0.6  2.341125 -19.8078452  24.49010 1.00000000
## TN3-2:1.2-TN3-2:0.6  2.132864 -19.4253605  23.69109 1.00000000
## TN3-2:1.2-TN3-2:0.9 -0.208261 -22.3572315  21.94071 1.00000000
# TN3-21
tn3_21<-tricho.tukey_results$`isolate:Concentration`[grep("TN3-21:.*-TN3-21:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn3_21
##                             diff         lwr       upr        p adj
## TN3-21:0.3-TN3-21:0    22.021186   0.4629612 43.579411 0.0358701399
## TN3-21:0.6-TN3-21:0     7.982164 -13.5760604 29.540389 0.9999999992
## TN3-21:0.9-TN3-21:0    26.972345   5.4141198 48.530570 0.0004967289
## TN3-21:1.2-TN3-21:0    15.513286  -6.0449385 37.071511 0.7975794233
## TN3-21:0.6-TN3-21:0.3 -14.039022 -35.5972465  7.519203 0.9467153140
## TN3-21:0.9-TN3-21:0.3   4.951159 -16.6070663 26.509383 1.0000000000
## TN3-21:1.2-TN3-21:0.3  -6.507900 -28.0661246 15.050325 1.0000000000
## TN3-21:0.9-TN3-21:0.6  18.990180  -2.5680447 40.548405 0.2398772105
## TN3-21:1.2-TN3-21:0.6   7.531122 -14.0271029 29.089347 0.9999999999
## TN3-21:1.2-TN3-21:0.9 -11.459058 -33.0172831 10.099167 0.9993631352
# TN3-49
tn3_49<-tricho.tukey_results$`isolate:Concentration`[grep("TN3-49:.*-TN3-49:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn3_49
##                             diff        lwr       upr      p adj
## TN3-49:0.3-TN3-49:0   69.7196152  47.570645  91.86859 0.00000000
## TN3-49:0.6-TN3-49:0   86.6847210  64.535750 108.83369 0.00000000
## TN3-49:0.9-TN3-49:0   87.2108967  65.652672 108.76912 0.00000000
## TN3-49:1.2-TN3-49:0   91.6895848  70.131360 113.24781 0.00000000
## TN3-49:0.6-TN3-49:0.3 16.9651058  -5.759259  39.68947 0.70832491
## TN3-49:0.9-TN3-49:0.3 17.4912815  -4.657689  39.64025 0.54681237
## TN3-49:1.2-TN3-49:0.3 21.9699696  -0.179001  44.11894 0.05645466
## TN3-49:0.9-TN3-49:0.6  0.5261757 -21.622795  22.67515 1.00000000
## TN3-49:1.2-TN3-49:0.6  5.0048638 -17.144107  27.15383 1.00000000
## TN3-49:1.2-TN3-49:0.9  4.4786881 -17.079537  26.03691 1.00000000
# TN3-61
tn3_61<-tricho.tukey_results$`isolate:Concentration`[grep("TN3-61:.*-TN3-61:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn3_61
##                            diff        lwr      upr        p adj
## TN3-61:0.3-TN3-61:0   24.078037   2.519812 45.63626 7.042260e-03
## TN3-61:0.6-TN3-61:0   36.421753  14.863528 57.97998 8.322810e-09
## TN3-61:0.9-TN3-61:0   32.990867  10.841897 55.13984 1.939825e-06
## TN3-61:1.2-TN3-61:0   51.902625  30.344400 73.46085 0.000000e+00
## TN3-61:0.6-TN3-61:0.3 12.343716  -9.214509 33.90194 9.957544e-01
## TN3-61:0.9-TN3-61:0.3  8.912831 -13.236140 31.06180 1.000000e+00
## TN3-61:1.2-TN3-61:0.3 27.824588   6.266363 49.38281 2.121962e-04
## TN3-61:0.9-TN3-61:0.6 -3.430885 -25.579856 18.71809 1.000000e+00
## TN3-61:1.2-TN3-61:0.6 15.480872  -6.077353 37.03910 8.021262e-01
## TN3-61:1.2-TN3-61:0.9 18.911758  -3.237213 41.06073 3.180076e-01
# TN4-40
tn4_40<-tricho.tukey_results$`isolate:Concentration`[grep("TN4-40:.*-TN4-40:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn4_40
##                             diff        lwr       upr     p adj
## TN4-40:0.3-TN4-40:0    4.9560609 -16.602164  26.51429 1.0000000
## TN4-40:0.6-TN4-40:0   79.6104738  58.052249 101.16870 0.0000000
## TN4-40:0.9-TN4-40:0   93.7228595  72.164635 115.28108 0.0000000
## TN4-40:1.2-TN4-40:0   93.4537341  71.304764 115.60270 0.0000000
## TN4-40:0.6-TN4-40:0.3 74.6544129  53.096188  96.21264 0.0000000
## TN4-40:0.9-TN4-40:0.3 88.7667986  67.208574 110.32502 0.0000000
## TN4-40:1.2-TN4-40:0.3 88.4976732  66.348703 110.64664 0.0000000
## TN4-40:0.9-TN4-40:0.6 14.1123857  -7.445839  35.67061 0.9421168
## TN4-40:1.2-TN4-40:0.6 13.8432603  -8.305710  35.99223 0.9736748
## TN4-40:1.2-TN4-40:0.9 -0.2691254 -22.418096  21.87985 1.0000000
# TN4-47
tn4_47<-tricho.tukey_results$`isolate:Concentration`[grep("TN4-47:.*-TN4-47:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn4_47
##                           diff        lwr      upr        p adj
## TN4-47:0.3-TN4-47:0    9.51661 -12.041615 31.07483 9.999986e-01
## TN4-47:0.6-TN4-47:0   25.01059   3.452366 46.56882 3.126932e-03
## TN4-47:0.9-TN4-47:0   36.92297  15.364744 58.48119 3.856492e-09
## TN4-47:1.2-TN4-47:0   54.68601  33.127787 76.24424 0.000000e+00
## TN4-47:0.6-TN4-47:0.3 15.49398  -6.064243 37.05221 8.002935e-01
## TN4-47:0.9-TN4-47:0.3 27.40636   5.848135 48.96458 3.233062e-04
## TN4-47:1.2-TN4-47:0.3 45.16940  23.611177 66.72763 0.000000e+00
## TN4-47:0.9-TN4-47:0.6 11.91238  -9.645847 33.47060 9.982166e-01
## TN4-47:1.2-TN4-47:0.6 29.67542   8.117196 51.23365 3.033477e-05
## TN4-47:1.2-TN4-47:0.9 17.76304  -3.795182 39.32127 4.188750e-01
# TN5-34
tn5_34<-tricho.tukey_results$`isolate:Concentration`[grep("TN5-34:.*-TN5-34:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn5_34
##                             diff         lwr        upr        p adj
## TN5-34:0.3-TN5-34:0    39.957684  18.3994594  61.515909 0.000000e+00
## TN5-34:0.6-TN5-34:0    15.291917  -6.2663078  36.850142 8.275869e-01
## TN5-34:0.9-TN5-34:0   -15.256654 -36.8148789   6.301571 8.321343e-01
## TN5-34:1.2-TN5-34:0     6.479210 -15.0790148  28.037435 1.000000e+00
## TN5-34:0.6-TN5-34:0.3 -24.665767 -46.2239921  -3.107542 4.242815e-03
## TN5-34:0.9-TN5-34:0.3 -55.214338 -76.7725632 -33.656113 0.000000e+00
## TN5-34:1.2-TN5-34:0.3 -33.478474 -55.0366991 -11.920249 3.786443e-07
## TN5-34:0.9-TN5-34:0.6 -30.548571 -52.1067960  -8.990346 1.159414e-05
## TN5-34:1.2-TN5-34:0.6  -8.812707 -30.3709319  12.745518 9.999999e-01
## TN5-34:1.2-TN5-34:0.9  21.735864   0.1776392  43.294089 4.408847e-02
# TN5-9
tn5_9<-tricho.tukey_results$`isolate:Concentration`[grep("TN5-9:.*-TN5-9:.*",row.names(tricho.tukey_results$`isolate:Concentration`)),]
tn5_9
##                          diff        lwr       upr        p adj
## TN5-9:0.3-TN5-9:0   41.389667  19.831442  62.94789 0.000000e+00
## TN5-9:0.6-TN5-9:0   71.975078  50.416854  93.53330 0.000000e+00
## TN5-9:0.9-TN5-9:0   74.488324  52.930099  96.04655 0.000000e+00
## TN5-9:1.2-TN5-9:0   86.693045  65.134820 108.25127 0.000000e+00
## TN5-9:0.6-TN5-9:0.3 30.585412   9.027187  52.14364 1.112639e-05
## TN5-9:0.9-TN5-9:0.3 33.098657  11.540432  54.65688 5.999524e-07
## TN5-9:1.2-TN5-9:0.3 45.303378  23.745153  66.86160 0.000000e+00
## TN5-9:0.9-TN5-9:0.6  2.513245 -19.044980  24.07147 1.000000e+00
## TN5-9:1.2-TN5-9:0.6 14.717966  -6.840258  36.27619 8.930916e-01
## TN5-9:1.2-TN5-9:0.9 12.204721  -9.353504  33.76295 9.967531e-01
# Creating a data frame that includes the percent inhibition for B. bassiana that will be merged into the Trichoderma data frame for plotting.
beauveria.juglone_no_na_control_average_percent_inhibition_long_df<-data.frame(isolate=rep("GHA",times=nrow(beauveria.juglone_no_na_control_average_percent_inhibition_long)),beauveria.juglone_no_na_control_average_percent_inhibition_long)

# Merging the B. bassiana data frame in the Trichoderma frame
beauveria.trichoderma.juglone_inhibition_frames<-rbind(beauveria.juglone_no_na_control_average_percent_inhibition_long_df,trichoderma.juglone_inhibition_frames[,grep("Replicate",colnames(trichoderma.juglone_inhibition_frames),invert=TRUE)])

# Changing the name of RootShield to KRL-AG2 for consistency with the manuscript
beauveria.trichoderma.juglone_inhibition_frames$isolate<-sub("RootShield","KRL-AG2",beauveria.trichoderma.juglone_inhibition_frames$isolate)

# Importing a dataframe that contains the significance lettering based on the above tukey tests to add to ggplot
tricho_juglone_sig_codes<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/trichoderma_sig_codes.txt",header=TRUE,sep='\t')

# Converting concentration to factor
tricho_juglone_sig_codes$Concentration<-as.factor(tricho_juglone_sig_codes$Concentration)

# Plotting data in ggplot
juglone_summaries<-ggplot(data=beauveria.trichoderma.juglone_inhibition_frames,aes(x=Concentration,y=percent_inhibition,fill=Concentration))+
geom_boxplot(outlier.shape=NA)+
  geom_jitter()+
  facet_wrap(.~isolate,nrow = 4,ncol=4)+
  geom_hline(yintercept = c(0,50),linetype=2)+
  theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
 geom_text(data=tricho_juglone_sig_codes,aes(x=Concentration,y=110,label=Code),inherit.aes = FALSE)+
  scale_y_continuous(limits=c(-50,110),breaks=c(-50,-25,0,25,50,75,100))+
  ylab("Percent Inhibition (%)")+
  xlab("Concentration (mg/mL)")

juglone_summaries

#ggsave("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/manuscript_versions/manuscript_biocontrol_journal/figures/figure_03.eps",juglone_summaries,dpi = 1200,height=12,width=12)

Part 02: Dual-plate Antagonism Assays

Data Import

Below I import the following data frames:

  1. dual_plate_trial_01.txt: Contains the antagonism ratings for the first trial of dual-plate assays.
  2. dual_plate_trial_02.txt: Contains the antagonism ratings for the second trial of dual-plate assays.
# Loading in first trial of dual plate assays
dual_plate_trial_1<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/dual_plate_trial_01.txt",header=TRUE,sep='\t')

# Loading in second trial of dual plate assays
dual_plate_trial_2<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/dual_plate_trial_02.txt",header=TRUE,sep='\t')

Part 02.1: Trial 1 of Dual-Plate Assays

Below I plot the results for the first trial of dual-plate assays. This trial includes 15 different isolates of Trichoderma originally recovered in Gazis et al. 2018.

# Changing name of rootshield isolate for consistency with manuscript
dual_plate_trial_1$Isolate<-sub("Rootshield","KRL-AG2",dual_plate_trial_1$Isolate)

# Plotting data in ggplot
dual_plate_round_1<-ggplot(data=dual_plate_trial_1,aes(x=Rating))+
 geom_histogram(color="black",binwidth = 0.5)+
  geom_vline(xintercept = 2.5,linetype=2,color="red")+
  facet_wrap(.~Isolate,scales="free_x",nrow =3 ,ncol=5)+
    theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
  xlab("Antagonism Ranking")+
  ylab("Count")+
  scale_x_continuous(limits=c(0,5),breaks=c(1,2,3,4))+
  scale_y_continuous(limits=c(0,5),breaks=c(1,2,3,4))+
  coord_flip()

dual_plate_round_1

Part 02.2: Trial 2 of Dual-Plate Assays

Below I plot the results for the second trial of dual-plate assays. This trial includes 6 different isolates of Trichoderma and 3 different isolates of G. morbida

# Adjusting isolate names for consistency
dual_plate_trial_2$GM<-sub("CAGM17-1","CA Gm17-1",dual_plate_trial_2$GM)
dual_plate_trial_2$GM<-sub("ORGM62-3","OR Gm62-3",dual_plate_trial_2$GM)
dual_plate_trial_2$GM<-sub("TNGM17","TN Gm17",dual_plate_trial_2$GM)
dual_plate_trial_2$trichoderma<-sub("RootShield","KRL-AG2",dual_plate_trial_2$trichoderma)

# Plotting data in ggplot
dual_plate_round2<-ggplot(data=dual_plate_trial_2,aes(x=rating,fill=GM))+
  geom_histogram(color="black",binwidth = 0.5)+
 # geom_point(data=dual_plate_trial_2,position=position_dodge(width=0.75),aes(x=GM,y=rating))+
geom_vline(xintercept = 2.5,linetype=2,color="red")+
  facet_wrap(.~trichoderma,scales="free_x")+
    theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
  xlab("Antagonism Ranking")+
  ylab("Count")+
  scale_x_continuous(limits=c(0,5),breaks=c(1,2,3,4))+
  scale_y_continuous(limits=c(0,16),breaks=c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))+
  coord_flip()
  
  dual_plate_round2

dual_plate_assay_plot<-ggarrange(dual_plate_round_1,dual_plate_round2,ncol=1,nrow=2,labels=c("A","B"))
dual_plate_assay_plot

#ggsave("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/manuscript_versions/manuscript_biocontrol_journal/figures/figure_04.eps",dual_plate_assay_plot,dpi = 1200,height=8,width=12)

Part 03: Trichoderma Metabolite Assays

Importing data into R. The following data frames are used for the analyses:

  1. colony_area_poison_agar.txt: contains the colony areas for each G. morbida x Trichoderma metabolite pairing across all three concentrations.
# Loading in the poison agar data
poison_agar_area<-read.table("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/raw_data/colony_area_poison_agar.txt",header=TRUE,sep='\t',na.strings = "NA")

Part 03.1: Trichoderma Metabolite Assays: Data Formatting

# Determining numer of samples lost to plug dislodging
nrow(poison_agar_area)
## [1] 585
nrow(na.omit(poison_agar_area))
## [1] 571
# Converting table to wide format
poison_colony_area_jug_no.na_wide<-spread((poison_agar_area),Treatment,Area)

# Converting replicate to a character so it is not interpreted numerically
poison_colony_area_jug_no.na_wide$Replicate<-as.character(poison_colony_area_jug_no.na_wide$Replicate)

# Converting percentage to a character so it is not interpreted numerically
poison_colony_area_jug_no.na_wide$Percentage<-as.character(poison_colony_area_jug_no.na_wide$Percentage)

# Creating a list of the metabolite concentrations used
poison_concentrations<-unique(poison_colony_area_jug_no.na_wide$Percentage)

# Creating a list of the G. morbida isolates used
gm_isos<-unique(poison_colony_area_jug_no.na_wide$Isolate)

# Creating a list object that consists of individual data frames for each G. morbida isolate
poison_inhibition_frames<-data.frame()
gm_isos_poison_inhibition<-list()
for(x in 1:length(gm_isos)){
  gm_isos_poison<-poison_colony_area_jug_no.na_wide[grep(gm_isos[[x]],poison_colony_area_jug_no.na_wide$Isolate),]
  gm_isos_poison_inhibition<-append(gm_isos_poison_inhibition,list(gm_isos_poison))
}


# Applying the percent inhibition calculator function to the list of colony area data frame by G. morbida isolate
poison_percent_inhibition_list<-lapply(X = gm_isos_poison_inhibition,FUN=percent_inhibition_tabulator,concentration_list = poison_concentrations)


# Removing NA values
poison_percent_inhibition_list<-lapply(poison_percent_inhibition_list,na.omit)

# Binding the data frames stored in the list into a single data frame
poison_percent_inhibition_df<-rbindlist(poison_percent_inhibition_list)

# Creating new columns so that I can split treatments out by unautoclaved and autoclaved treatments

# Creating a column that contains the isolate ID (used single letters to avoid biasing results)
poison_percent_inhibition_df$tricho<-sub("^A|^U","",poison_percent_inhibition_df$treatment)

# Creating a column that contains the heat treatment
poison_percent_inhibition_df$heat<-sub("PDA","Autoclave",sub("^U.","Unautoclave",sub("^A.","Autoclave",poison_percent_inhibition_df$treatment)))

# Updating isoalte names to match manuscript
poison_percent_inhibition_df$Isolate<-sub("CA","CA Gm17-1",sub("TN","TN Gm17",sub("OR","OR Gm62-3",poison_percent_inhibition_df$Isolate)))

# Substituting isolate IDs with the their actual names
poison_percent_inhibition_df$iso_code<-poison_percent_inhibition_df$tricho
poison_percent_inhibition_df$iso_code<-sub("^A","TN3-21",poison_percent_inhibition_df$iso_code)
poison_percent_inhibition_df$iso_code<-sub("^B","TN4-47",poison_percent_inhibition_df$iso_code)
poison_percent_inhibition_df$iso_code<-sub("^C","KRL-AG2",poison_percent_inhibition_df$iso_code)
poison_percent_inhibition_df$iso_code<-sub("^D","TN4-40",poison_percent_inhibition_df$iso_code)
poison_percent_inhibition_df$iso_code<-sub("^E","TN3-61",poison_percent_inhibition_df$iso_code)
poison_percent_inhibition_df$iso_code<-sub("^F","TN1-66",poison_percent_inhibition_df$iso_code)

# Adding percent signs to the end of the percentage values
poison_percent_inhibition_df$Percentage<-sub("0","0%",poison_percent_inhibition_df$Percentage)

# Creating an object for only the autoclaved samples 
poison_percent_inhibition_autoclave<-poison_percent_inhibition_df[grep("Autoclave",poison_percent_inhibition_df$heat),]

# Double checking the number of samples
nrow(poison_percent_inhibition_autoclave)
## [1] 311
# Creating an object for only the non-autoclaved samples
poison_percent_inhibition_unautoclave_no_pda<-poison_percent_inhibition_df[grep("Unautoclave",poison_percent_inhibition_df$heat),]
poison_percent_inhibition_unautoclave<-rbind(poison_percent_inhibition_unautoclave_no_pda,poison_percent_inhibition_autoclave[grep("PDA",poison_percent_inhibition_autoclave$tricho),])

Part 03.2 Autoclaved samples

# Conducting an ANOVA on the autoclaved samples
poison_anova_auto<-aov(percent_inhibition~tricho*Percentage*Isolate,poison_percent_inhibition_autoclave)

# Checking model assumptions
par(mfrow=c(2,2))
plot(poison_anova_auto)

# Extracting ANOVA results
Anova(poison_anova_auto,type="III")
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted
## Anova Table (Type III tests)
## 
## Response: percent_inhibition
##                           Sum Sq  Df F value    Pr(>F)    
## (Intercept)                 2336   1  7.2967  0.007384 ** 
## tricho                     44191   6 23.0041 < 2.2e-16 ***
## Percentage                  8481   2 13.2445 3.427e-06 ***
## Isolate                     8468   2 13.2246 3.489e-06 ***
## tricho:Percentage           8278  12  2.1546  0.014430 *  
## tricho:Isolate              7669  12  1.9962  0.025113 *  
## Percentage:Isolate          1749   4  1.3659  0.246324    
## tricho:Percentage:Isolate   3798  24  0.4943  0.978820    
## Residuals                  79401 248                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Determining pairwise significance using Tukey tests
poison_tukey_results_auto<-TukeyHSD(poison_anova_auto)

# Pulling out the significant results using grep for each metabolite percentage

# 30%
poison_30_auto<-poison_tukey_results_auto$`tricho:Percentage`[grep(".*30.*30.*",row.names(poison_tukey_results_auto$`tricho:Percentage`)),]
poison_30_auto[poison_30_auto[,4]<0.05,]
##                    diff         lwr       upr        p adj
## B:30%-A:30%    84.25780   60.679236 107.83636 5.662137e-14
## C:30%-A:30%    25.75637    1.760459  49.75229 2.082718e-02
## F:30%-A:30%    39.65591   16.077346  63.23447 9.873164e-07
## C:30%-B:30%   -58.50142  -82.497338 -34.50551 3.081979e-13
## D:30%-B:30%   -76.25276  -99.831324 -52.67420 8.693046e-14
## E:30%-B:30%   -92.94251 -116.938424 -68.94660 5.639933e-14
## F:30%-B:30%   -44.60189  -68.180451 -21.02333 1.389946e-08
## PDA:30%-B:30% -93.98162 -117.560182 -70.40306 5.639933e-14
## E:30%-C:30%   -34.44109  -58.847215 -10.03496 1.374105e-04
## PDA:30%-C:30% -35.48020  -59.476109 -11.48428 4.293830e-05
## F:30%-D:30%    31.65087    8.072311  55.22943 4.283605e-04
## F:30%-E:30%    48.34062   24.344707  72.33653 9.804315e-10
## PDA:30%-F:30% -49.37973  -72.958292 -25.80117 1.662409e-10
# 50%
poison_50_auto<-poison_tukey_results_auto$`tricho:Percentage`[grep(".*50.*50.*",row.names(poison_tukey_results_auto$`tricho:Percentage`)),]
poison_50_auto[poison_50_auto[,4]<0.05,]
##                    diff         lwr         upr        p adj
## B:50%-A:50%    55.96730   32.388735  79.5458574 4.994893e-13
## E:50%-A:50%   -23.91189  -47.490451  -0.3333285 4.253613e-02
## PDA:50%-A:50% -40.83173  -64.410293 -17.2531700 3.699926e-07
## C:50%-B:50%   -38.31449  -61.893051 -14.7359277 2.947729e-06
## D:50%-B:50%   -69.43265  -93.011210 -45.8540870 2.263745e-13
## E:50%-B:50%   -79.87919 -103.457747 -56.3006245 6.050715e-14
## F:50%-B:50%   -41.51855  -65.097111 -17.9399886 2.065738e-07
## PDA:50%-B:50% -96.79903 -120.377589 -73.2204660 5.639933e-14
## D:50%-C:50%   -31.11816  -54.696721  -7.5395979 6.150485e-04
## E:50%-C:50%   -41.56470  -65.143258 -17.9861354 1.985918e-07
## PDA:50%-C:50% -58.48454  -82.063100 -34.9059769 2.690070e-13
## F:50%-D:50%    27.91410    4.335537  51.4926598 4.751244e-03
## PDA:50%-D:50% -27.36638  -50.944940  -3.7878176 6.578059e-03
## F:50%-E:50%    38.36064   14.782074  61.9391973 2.840209e-06
## PDA:50%-F:50% -55.28048  -78.859039 -31.7019160 7.532863e-13
# 70%
poison_70_auto<-poison_tukey_results_auto$`tricho:Percentage`[grep(".*70.*70.*",row.names(poison_tukey_results_auto$`tricho:Percentage`)),]
poison_70_auto[poison_70_auto[,4]<0.05,]
##                    diff         lwr        upr        p adj
## B:70%-A:70%    45.55203   21.083403  70.020662 2.610422e-08
## PDA:70%-A:70% -51.64734  -76.115973 -27.178714 1.146224e-10
## C:70%-B:70%   -40.66380  -64.242364 -17.085241 4.262088e-07
## D:70%-B:70%   -52.09029  -75.668854 -28.511732 1.221778e-11
## E:70%-B:70%   -63.78104  -87.359603 -40.202480 2.616796e-13
## F:70%-B:70%   -35.08339  -58.661947 -11.504825 3.641339e-05
## PDA:70%-B:70% -97.19938 -120.777937 -73.620814 5.639933e-14
## PDA:70%-C:70% -56.53557  -80.114135 -32.957012 3.989031e-13
## PDA:70%-D:70% -45.10908  -68.687644 -21.530521 8.806916e-09
## F:70%-E:70%    28.69766    5.119094  52.276217 2.945336e-03
## PDA:70%-E:70% -33.41833  -56.996895  -9.839772 1.238148e-04
## PDA:70%-F:70% -62.11599  -85.694551 -38.537428 2.583489e-13
# Creating a data frame that has all of the significance lettering for ggplot
sig_codes_auto<-data.frame(Percentage=c(rep("30%",7),rep("50%",7),rep("70%",7)),TI=c(rep(c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"),3)),sig_code=c("A","A","B","CD","AC","A","D",
                                            "A","BD","C","D","BE","AE","D",
                                            "A","BC","D","BC","BC","B","C"))

# Converting isolate IDs to a factor
poison_percent_inhibition_autoclave$iso_code<-factor(poison_percent_inhibition_autoclave$iso_code,levels=c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"))

# Changing RootShield name for consistency with the manuscript
poison_percent_inhibition_autoclave$tricho<-sub("RootShield","KRL-AG2",poison_percent_inhibition_autoclave$tricho)

# Plotting results in ggplot
autoclave_pi<-ggplot(data=poison_percent_inhibition_autoclave,aes(x=iso_code,y=percent_inhibition,fill=iso_code))+
geom_boxplot(outlier.shape=NA)+
  geom_point(position = position_jitterdodge(jitter.width = 0.05),color="black",aes(shape=Isolate))+
  facet_wrap(.~Percentage,nrow = 1,ncol=3)+
  geom_hline(yintercept = c(0,50),linetype=2)+
  theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
  geom_text(data=sig_codes_auto,aes(x=TI,y=105,label=sig_code),inherit.aes = FALSE)+
  scale_x_discrete(labels=c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"))+
   guides(fill=guide_legend(title = "Trichoderma spp. Isolate"),shape=guide_legend(title="Geosmithia morbida Isolate"))+
  xlab("Trichoderma spp. Isolate")+
  ylab("Percent Inhibition (%)")
autoclave_pi

Part 03.3 Non-autoclaved samples

# Conducting an ANOVA on the unautoclaved samples
poison_anova_unauto<-aov(percent_inhibition~tricho*Percentage*Isolate,poison_percent_inhibition_unautoclave)

# Checking model assumptions
par(mfrow=c(2,2))
plot(poison_anova_unauto)

# Extracting ANOVA results
Anova(poison_anova_unauto,type="III")
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted

## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
##      arithmetic operators in their names;
##   the printed representation of the hypothesis will be omitted
## Anova Table (Type III tests)
## 
## Response: percent_inhibition
##                           Sum Sq  Df F value    Pr(>F)    
## (Intercept)                 1020   1  3.4271 0.0653533 .  
## tricho                     47674   6 26.6901 < 2.2e-16 ***
## Percentage                  2963   2  4.9764 0.0076214 ** 
## Isolate                     4916   2  8.2562 0.0003399 ***
## tricho:Percentage           6416  12  1.7959 0.0494180 *  
## tricho:Isolate              6389  12  1.7883 0.0506585 .  
## Percentage:Isolate          5108   4  4.2897 0.0022645 ** 
## tricho:Percentage:Isolate   7416  24  1.0380 0.4183096    
## Residuals                  72044 242                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Determining pairwise significance using Tukey tests
poison_tukey_results_unauto<-TukeyHSD(poison_anova_unauto)

# Pulling out the significant results using grep for each metabolite percentage

# 30%
poison_30_unauto<-poison_tukey_results_unauto$`tricho:Percentage`[grep(".*30.*30.*",row.names(poison_tukey_results_unauto$`tricho:Percentage`)),]
poison_30_unauto[poison_30_unauto[,4]<0.05,]
##                    diff         lwr        upr        p adj
## B:30%-A:30%    87.37735   64.634759 110.119933 9.003909e-14
## F:30%-A:30%    32.04340    8.442305  55.644501 3.362207e-04
## C:30%-B:30%   -67.33737  -90.079961 -44.594787 2.513545e-13
## D:30%-B:30%   -76.41330  -99.155883 -53.670709 9.803269e-14
## E:30%-B:30%   -94.49620 -117.238783 -71.753609 9.003909e-14
## F:30%-B:30%   -55.33394  -78.935041 -31.732845 8.255618e-13
## PDA:30%-B:30% -97.21501 -119.957602 -74.472428 9.003909e-14
## E:30%-C:30%   -27.15882  -49.901409  -4.416236 4.114498e-03
## PDA:30%-C:30% -29.87764  -52.620228  -7.135054 6.805851e-04
## F:30%-E:30%    39.16225   15.561155  62.763351 1.557129e-06
## PDA:30%-F:30% -41.88107  -65.482169 -18.279974 1.608474e-07
# 50%
poison_50_unauto<-poison_tukey_results_unauto$`tricho:Percentage`[grep(".*50.*50.*",row.names(poison_tukey_results_unauto$`tricho:Percentage`)),]
poison_50_unauto[poison_50_unauto[,4]<0.05,]
##                    diff          lwr        upr        p adj
## B:50%-A:50%    78.31030   54.7694894 101.851117 1.006972e-13
## F:50%-A:50%    30.20699    7.0618486  53.352132 7.794207e-04
## C:50%-B:50%   -63.07915  -86.6199604 -39.538332 2.873257e-13
## D:50%-B:50%   -71.72701  -94.8721530 -48.581869 1.784128e-13
## E:50%-B:50%   -74.31850  -97.4636390 -51.173355 1.280087e-13
## F:50%-B:50%   -48.10331  -71.2484548 -24.958171 2.498094e-10
## PDA:50%-B:50% -97.34881 -120.4939470 -74.203663 9.003909e-14
## PDA:50%-C:50% -34.26966  -57.4148005 -11.124517 4.187993e-05
## F:50%-D:50%    23.62370    0.8811112  46.366285 3.185416e-02
## PDA:50%-D:50% -25.62179  -48.3643810  -2.879207 1.046884e-02
## F:50%-E:50%    26.21518    3.4725973  48.957771 7.355754e-03
## PDA:50%-E:50% -23.03031  -45.7728949  -0.287721 4.327755e-02
## PDA:50%-F:50% -49.24549  -71.9880791 -26.502905 3.517708e-11
# 70%
poison_70_unauto<-poison_tukey_results_unauto$`tricho:Percentage`[grep(".*70.*70.*",row.names(poison_tukey_results_unauto$`tricho:Percentage`)),]
poison_70_unauto[poison_70_unauto[,4]<0.05,]
##                    diff         lwr        upr        p adj
## B:70%-A:70%    77.39179   54.649205 100.134379 9.336976e-14
## C:70%-A:70%    37.34151   14.598923  60.084097 2.173750e-06
## D:70%-A:70%    29.75588    6.610741  52.901025 1.055658e-03
## F:70%-A:70%    41.82987   18.684729  64.975013 8.273593e-08
## C:70%-B:70%   -40.05028  -62.792868 -17.307694 2.111030e-07
## D:70%-B:70%   -47.63591  -70.781050 -24.490766 3.915283e-10
## E:70%-B:70%   -81.11376 -105.235916 -56.991604 9.792167e-14
## F:70%-B:70%   -35.56192  -58.707063 -12.416779 1.545839e-05
## PDA:70%-B:70% -97.55826 -120.300849 -74.815675 9.003909e-14
## E:70%-C:70%   -41.06348  -65.185635 -16.941322 6.762492e-07
## PDA:70%-C:70% -57.50798  -80.250567 -34.765393 2.963185e-13
## E:70%-D:70%   -33.47785  -57.979908  -8.975796 2.920660e-04
## PDA:70%-D:70% -49.92235  -73.067495 -26.777211 4.258227e-11
## F:70%-E:70%    45.55184   21.049783  70.053895 2.841295e-08
## PDA:70%-F:70% -61.99634  -85.141483 -38.851199 2.869927e-13
# Creating a data frame that has all of the significance lettering for ggplot
sig_codes_unauto<-data.frame(Percentage=c(rep("30%",7),rep("50%",7),rep("70%",7)),TI=c(rep(c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"),3)),sig_code=c("A","AB","C","BD","ABD","A","D",
                                                                                                                                           "A","AC","B","CD","C","C","D",
                                                                                                                                           "A","A","B","C","C","A","C"))

# Converting isolate IDs to a factor
poison_percent_inhibition_unautoclave$iso_code<-factor(poison_percent_inhibition_unautoclave$iso_code,levels=c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"))

# Changing RootShield name for consistency with the manuscript
poison_percent_inhibition_unautoclave$tricho<-sub("RootShield","KRL-AG2",poison_percent_inhibition_unautoclave$tricho)

# Plotting results in ggplot
unautoclave_pi<-ggplot(data=poison_percent_inhibition_unautoclave,aes(x=iso_code,y=percent_inhibition,fill=iso_code))+
geom_boxplot(outlier.shape=NA)+
  geom_point(position = position_jitterdodge(jitter.width = 0.05),color="black",aes(shape=Isolate))+
  facet_wrap(.~Percentage,nrow = 1,ncol=3)+
  geom_hline(yintercept = c(0,50),linetype=2)+
  theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank(),axis.title.x = element_blank())+
  geom_text(data=sig_codes_unauto,aes(x=TI,y=105,label=sig_code),inherit.aes = FALSE)+
  scale_x_discrete(labels=c("PDA","TN3-21","TN4-47","KRL-AG2","TN4-40","TN3-61","TN1-66"))+
  guides(fill=guide_legend(title = "Trichoderma spp. Isolate"),shape=guide_legend(title="Geosmithia morbida Isolate"))+
   xlab("Trichoderma spp. Isolate")+
  ylab("Percent Inhibition (%)")
unautoclave_pi

metabolite_summary_results<-ggarrange(unautoclave_pi,autoclave_pi,nrow=2,common.legend = TRUE,labels=c("Non-autoclaved","Autoclaved"))
metabolite_summary_results

#ggsave("/Users/aarononfurak/Library/CloudStorage/GoogleDrive-onufrak.aaron@gmail.com/My Drive/utk_project/trichoderma_antagonism_manuscript/manuscript_versions/manuscript_biocontrol_journal/figures/figure_05.eps",metabolite_summary_results,dpi = 1200,height=8,width=14,bg="white")

Part 03.4 Assessing effects of heat treatments

# Removing the PDA control because it does not receive heat treatment
poison_percent_inhibition_df_no_pda<-poison_percent_inhibition_df[grep("PDA",poison_percent_inhibition_df$tricho,invert=TRUE),]

# Performing ANOVA
autoclave_aov<-aov(percent_inhibition~heat*tricho*Percentage+Isolate*tricho*Percentage,data=poison_percent_inhibition_df_no_pda)

# Assessing model assumptions
par(mfrow=c(2,2))
plot(autoclave_aov)

# Getting ANOVA summaries
Anova(autoclave_aov,type="III")

# Assessing pairwise signficant differences using tukey tests
tukey_heat<-TukeyHSD(autoclave_aov)

tukey_heat_tricho_perce<-as.data.frame(tukey_heat$`heat:tricho:Percentage`)
tukey_heat_tricho_perce_sig<-tukey_heat_tricho_perce[tukey_heat_tricho_perce$`p adj`<0.05,]

# Using grep to look at heat x G. 
tukey_heat_tricho_perce_sig[grep("Unautoclave:A:.*-Autoclave:A:.*",row.names(tukey_heat_tricho_perce_sig)),]
tukey_heat_tricho_perce_sig[grep("Unautoclave:B:.*-Autoclave:B:.*",row.names(tukey_heat_tricho_perce_sig)),]
tukey_heat_tricho_perce_sig[grep("Unautoclave:C:.*-Autoclave:C:.*",row.names(tukey_heat_tricho_perce_sig)),]
tukey_heat_tricho_perce_sig[grep("Unautoclave:D:.*-Autoclave:D:.*",row.names(tukey_heat_tricho_perce_sig)),]
tukey_heat_tricho_perce_sig[grep("Unautoclave:E:.*-Autoclave:E:.*",row.names(tukey_heat_tricho_perce_sig)),]
tukey_heat_tricho_perce_sig[grep("Unautoclave:F:.*-Autoclave:F:.*",row.names(tukey_heat_tricho_perce_sig)),]

# Creating a data frame of significant codings for ggplot
sig_codes_heat_trt<-data.frame(Percentage=c(rep(c("30%","50%","70%"),12)),iso_code=c(rep("KRL-AG2",6),rep("TN1-66",6),rep("TN3-21",6),rep("TN3-61",6),rep("TN4-40",6),rep("TN4-47",6)),sig_code=c(NA,"B",NA,NA,"A",NA,rep(NA,6),NA,NA,"A",NA,NA,"B",rep(NA,18)),heat=rep(c("Autoclave","Unautoclave"),18))

# Plotting data in ggplot
ggplot(data=poison_percent_inhibition_df_no_pda,aes(x=Percentage,y=percent_inhibition,fill=heat))+
geom_boxplot(outlier.shape=NA)+
  geom_point(position = position_jitterdodge(jitter.width = 0.05),color="black",aes(shape=Isolate))+
  facet_wrap(.~iso_code,nrow = 2,ncol=3)+
  geom_hline(yintercept = c(0,50),linetype=2)+
  theme(panel.grid=element_blank(),panel.background = element_blank(),panel.border = element_rect(fill=NA),strip.background = element_blank())+
  guides(fill=guide_legend(title = "Heat Treatment"))+
 geom_text(data=sig_codes_heat_trt,aes(x=Percentage,y=105,label=sig_code,group=heat),position = position_jitterdodge(jitter.width = 0.05))+
  ylab("Percent Inhibition (%)")+
  #geom_segment(data=sig_codes_heat_trt,aes(x=x,xend=xend,y=100,yend=100),inherit.aes = FALSE)+
  xlab("Isolate")